﻿
#ifndef pqMyPropertyWidgetForProperty_h
#define pqMyPropertyWidgetForProperty_h

#include "pqPropertyWidget.h"
#include"MeshModel.h"
#include "Project.h"

namespace conduit_cpp
{
    class Node;
}

class pqMyPropertyWidgetForProperty : public pqPropertyWidget
{
  Q_OBJECT
  typedef pqPropertyWidget Superclass;

public:
  pqMyPropertyWidgetForProperty(
    vtkSMProxy* smproxy, vtkSMProperty* smproperty, QWidget* parentObject = 0);
  virtual ~pqMyPropertyWidgetForProperty();

private:

   void projectMeth(MeshModel mm);

  std::shared_ptr<Geometry> getGeometry(Project& project);

  void setMeshDictNode(const std::shared_ptr<Geometry>& geometry, const double& maxCellSize, conduit_cpp::Node& node);

  void setLocalRefinement(const std::string& patchName, const double& cellSize, conduit_cpp::Node& node);

  void setBoundaryLayer(const std::string& patchName,
                        const int& layerNumber,
                        const double& thicknessRatio,
                        const double& maxFirstLayerThickness,
                        conduit_cpp::Node& node);

  void setBoxRefinement(const std::string& name,
                        const std::string& type,
                        const double& cellSize,
                        const double& centerX,
                        const double& centerY,
                        const double& centerZ,
                        const double& xlength,
                        const double& ylength,
                        const double& zlength,
                        const double& refinementThickness,
                        conduit_cpp::Node& node);

  void setSphereRefinement(const std::string& name,
                           const std::string& type,
                           const double& cellSize,
                           const double& sphereCenterX,
                           const double& sphereCenterY,
                           const double& sphereCenterZ,
                           const double& sphereRadius,
                           const double& refinementThickness,
                           conduit_cpp::Node& node);

  void setConeRefinement(const std::string& name,
                           const std::string& type,
                           const double& cellSize,
                           const double& cone_point0X,
                           const double& cone_point0Y,
                           const double& cone_point0Z,
                           const double& cone_point1X,
                           const double& cone_point1Y,
                           const double& cone_point1Z,
                           const double& cone_radius0,
                           const double& cone_radius1,
                           const double& refinementThickness,
                           conduit_cpp::Node& node);

  void setLineRefinement(const std::string& name,
                         const std::string& type,
                         const double& cellSize,
                         const double& line_point0X,
                         const double& line_point0Y,
                         const double& line_point0Z,
                         const double& line_point1X,
                         const double& line_point1Y,
                         const double& line_point1Z,
                         const double& refinementThickness,
                         conduit_cpp::Node& node);

  void setGeometryRefinement(const std::string& name,
                           const std::string& geo_type,
                           const double& cellSize,
                           const std::string& geo_input_name,
                           const double& refinementThickness,
                           conduit_cpp::Node& node);


  std::string workSpace;
  std::string geometryPath;
  std::string blueCFDPath;
  Project project;
  Q_DISABLE_COPY(pqMyPropertyWidgetForProperty);

 private slots:
  void setProcessRate(QString processMsg, int rate);

   
};

#endif
